package com.mjx.algorithm.oj;

import java.io.BufferedReader;
import java.io.InputStreamReader;

/**
 * 去掉注释问题
 * Created by meijingxiang on 2017/2/10.
 */
public class problem1078 {
    public static void main(String[] args) {
//        Scanner scanner = new Scanner(System.in);
//        String s = scanner.next();
        InputStreamReader in =new InputStreamReader(System.in);
        BufferedReader reader = new BufferedReader(in);
        String s = "";
        char[] ch = new char[30000];
        try {
            reader.read(ch);
        } catch (Exception e) {
            e.printStackTrace();
        }
        boolean zhushi = false;
        boolean hh = true;
        for (int i = 0; i < ch.length; i++) {
            char c = ch[i];
            if (c != 0) {
                if (zhushi){
                    if (c == '\n') {
                        zhushi = false;
                        if (hh == true)
                            ch[i] = 0;
                        hh = true;
                    }
                    else
                        ch[i] = 0;
                }
//                System.out.print(ch[i]);
                if (c == '/' && i+1 < ch.length && ch[i+1] == '/'){
                    if (i - 1 >= 0 && ch[i-1] != '\n' && ch[i-1] != 0)
                        hh = false;
                    ++i;
                    ch[i] = ch[i-1] = 0;
                    zhushi = true;
                }
            }
        }
        for (int i = 0; i < ch.length; i++) {
            if (ch[i] != 0)
                System.out.print(ch[i]);
        }
    }
}
